﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Paihangbang.aspx.cs" Inherits="RaceList.activity.mhalloween.Paihangbang" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8' />

    <title>不给糖就捣乱</title>

    <meta name='keywords' content=''>
    <meta name='description' content=''>
    <meta name='viewport' content='width=device-width,initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no' />

    <link href='style/layout.css' rel='stylesheet' />
    <script src='js/jquery-1.9.1.min.js'></script>


</head>
<body>
    <section id='web_wrap'>
        <!-- 页面框架 -->
        <div class='container'>
            <div class='bg_box'>
                <div class="ranking">
                    <%
                        string title = string.Empty;
                        if (UserId == 0)
                        {
                            title = "<div class='ranking_title'>排 行 榜</div>";
                        }
                        else
                        {
                            string headurl = HeadUrl;
                            headurl = string.IsNullOrEmpty(headurl) ? "images/user.jpg" : headurl;
                            title = "<h5><img src='{0}' alt=''>个人成绩</h5>";
                            title = String.Format(title, headurl);
                        } %>
                    <%= title %>
                    <div class="namebox">
                    </div>
                    <div class="loading">
                        <img src="images/loading.gif" alt="">
                        <p>正在加载</p>
                    </div>
                </div>
                <input type="hidden" id="currentPage" value="0" />
                <a href='<%= SessionHelp.IndexUrl %>' class="more_ranking">返回游戏首页</a>
                <div class='clear'></div>
            </div>
        </div>
    </section>
</body>
</html>
<script src='js/main2.js'></script>
<script type="text/javascript">
    $(function () {


        var ui = '<%= UserId %>';
        //清空input必须清空为0，如果是''，下次取不到值，因为parseInt('')返回NaN
        if ($('#currentPage').Exist()) {
            $('#currentPage').val('0'); //页面后退的时候，需要清空val中的数据,我不还清楚为什么一个hidden input会保存自己的数据    
        }
        GetFenYe(ui);
        $('.more_ranking').bind('click', function () {
            GetFenYe(ui);
        });
        $(window).scroll(function () {
            if ($(document).scrollTop() + $(window).height() >= $(document).height()) {
                GetFenYe(ui);
            }
        });
    });

    $(function () {
        var ui = '<%= UserId %>';
        if (isNaN(ui) || parseInt(ui) == 0) {
            $('#singleUser').hide();
        } else {
            $('#singleUser').show();
        }
        $('#singleUser > a:eq(0)').bind('click', function () {

        });
    });
</script>
